package com.ruoyi.personnelMatters.service;

import java.util.List;
import java.util.Map;

import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.personnelMatters.domain.PersonAssessment;

/**
 * 人事考核Service接口
 *
 * @author ruoyi
 * @date 2022-09-16
 */
public interface IPersonAssessmentService {
    /**
     * 查询人事考核
     *
     * @param personAssessmentId 人事考核主键
     * @return 人事考核
     */
    public PersonAssessment selectPersonAssessmentByPersonAssessmentId(Long personAssessmentId);

    /**
     * 查询人事考核列表
     *
     * @param personAssessment 人事考核
     * @return 人事考核集合
     */
    public List<PersonAssessment> selectPersonAssessmentList(PersonAssessment personAssessment);

    /**
     * 新增人事考核
     *
     * @param personAssessment 人事考核
     * @return 结果
     */
    public int insertPersonAssessment(PersonAssessment personAssessment);

    /**
     * 审批人事考核
     *
     * @param personAssessment 人事考核
     * @return 结果
     */
    public int updatePersonAssessment(PersonAssessment personAssessment);

    /**
     * 批量删除人事考核
     *
     * @param personAssessmentIds 需要删除的人事考核主键集合
     * @return 结果
     */
    public int deletePersonAssessmentByPersonAssessmentIds(Long[] personAssessmentIds);

    /**
     * 删除人事考核信息
     *
     * @param personAssessmentId 人事考核主键
     * @return 结果
     */
    public int deletePersonAssessmentByPersonAssessmentId(Long personAssessmentId);

    /**
     * 生成当月每个员工年度考核表
     */
    public int generateAppraisalForm();

    /**
     * @param personAssessmentId
     * @param userId
     * @return
     */
    public PersonAssessment selectPersonAssessmentByPersonAssessmentIdAndUid(Long personAssessmentId, Long userId);

    /**
     *  根据考核返回对应薪级
     *   优秀/合格/基本合格  薪级+1；不合格/不定等次，薪级不变
     * @param userId
     * @param assessmentResult
     * @return
     */
    public Map<String,Long> personnelAssessmentJudgment(Long userId, String assessmentResult);
}
